<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>My JSP 'consumberManager.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript">
	function del(uid){
	
	if(window.confirm("确定删除该用户吗？")){
	
	alert("你已经确定删除");
	window.location="mannager!deleteUser.action?userId="+uid;
	
	}else{
	alert("你已经取消删除");
	
	}
	
	}
	</script>
	
	</head>

	<body>
		
		<s:set name="yama" value="#session.pages"></s:set>
		<!-- -->
		<div align="center">
			<h1>
				用户管理界面
			</h1>
		</div>
		<div>
			<div id="newsselect" align="center">
				<table>
					<tr>
						<td>
							用户名
						</td>
						<td>
							用户性别
						</td>
						<td>
							用户email
						</td>
						<td>
							电话
						</td>
						<td>
							地址
						</td>
						<td>
							qq
						</td>
						<td>
							删除
						</td>
						<td>
							更新
						</td>
					</tr>
					<s:iterator value="#session.userlist" id="us">
						<tr>
							<td>
								${us.CName }
							</td>
							<td>
								${us.CSex }
							</td>
							<td>
								${us. CEmail}
							</td>
							<td>
								${us.CMobileTelephone }
							</td>
							<td>
								${us.CAffiliationAddress }
							</td>
							<td>
								${us.CQq }
							</td>
							<td>
								<a href="javascript:del(${us.id })">删除</a>
							</td>
							<td>
								<a href="#">更新</a>
							</td>
						</tr>
					</s:iterator>
				</table>
				<div>
					<s:if test="#yama>1">
						<a href="mannager!FindByUser.action?pages=${yama-1 }">上一页</a>
					</s:if>
					当前页:

					<s:property value="#yama" />
					<s:if test="#session.userlist.size()==5">
						<a href="mannager!FindByUser.action?pages=${yama+1 }">下一页</a>
					</s:if>
				</div>
			</div>
		</div>
	</body>
</html>
